package cn.edu.buaa.nlsde.mpj.fw.invoker.loader;

import cn.edu.buaa.nlsde.mpj.fw.model.procedure.LoopProcedure;
import cn.edu.buaa.nlsde.mpj.fw.model.procedure.Procedure;
import org.dom4j.Element;

public class LoopProcedureResolver extends ProcedureResolver {
    public LoopProcedure resolve(Element element) {
        ProcedureResolver resolver = new ProcedureResolver();
        Procedure procedure = resolver.resolve(element);
        LoopProcedure lp = (LoopProcedure) procedure;
        lp.setLoopBy(element.element("loopby").getTextTrim());
        return lp;
    }
}
